package com.mgkj.dto;


import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

/*
* 入库单头和单身传参
*
* */
@Data
@ApiModel("入库单头和单身传参")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class All implements Serializable {

    @ApiModelProperty(value = "单别",required = true)
    @NotBlank(message = "单别不能为空")
    @JsonProperty("TF001")
    private String TF001;

    @ApiModelProperty(value = "单号",required = true)
    @NotBlank(message = "单号不能为空")
    @JsonProperty("TF002")
    private String TF002;

    @ApiModelProperty(value = "入库日期",required = true)
    @NotBlank(message = "入库日期不能为空")
    @JsonProperty("TF003")
    private String TF003;

    @ApiModelProperty(value = "工厂编号",required = true)
    @NotBlank(message = "工厂编号不能为空")
    @JsonProperty("TF004")
    private String TF004;

    @ApiModelProperty(value = "备注")
    @JsonProperty("TF005")
    private String TF005;

    @ApiModelProperty(value = "审核码",required = true)
    @NotBlank(message = "审核码不能为空")
    @Pattern(regexp = "^[NY]$",message = "审核码只允许输入N|Y")
    @JsonProperty("TF006")
    private String TF006;

    @ApiModelProperty(value = "工作中心",required = true)
    @NotBlank(message = "工作中心不能为空")
    @JsonProperty("TF011")
    private String TF011;
    @ApiModelProperty(value = "审核者",required = true)
    @NotBlank(message = "审核者不能为空")
    @JsonProperty("TF013")
    private String TF013;

    @ApiModelProperty(value = "公司",required = true)
    @NotBlank(message = "公司不能为空")
    private String company;

    @ApiModelProperty(value = "入库单身")
    private List<MOCTGDto> moctgList;

}
